package com.zsyg.sys.service.impl;

import com.github.pagehelper.Page;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import org.springframework.beans.factory.annotation.Autowired;
import com.zsyg.sys.entity.SysDict;
import com.zsyg.sys.mapper.SysDictMapper;
import com.zsyg.sys.service.SysDictService;
import com.zsyg.common.base.BaseServiceImpl;
import org.springframework.stereotype.Service;

/**
 * <p>
 * 字典表 服务实现类
 * </p>
 *
 * @author YangWanLi
 * @since 2018-08-16
 */
@Service
public class SysDictServiceImpl extends BaseServiceImpl<SysDictMapper, SysDict> implements SysDictService {

    @Autowired
    private SysDictMapper sysDictMapper;

    /**
     * 分页
     * @param page
     * @param sysDict
     * @return
     */
    @Override
    public PageInfo<SysDict> findPage (Page<SysDict> page, SysDict sysDict){
        page = PageHelper.startPage(page.getPageNum(),page.getPageSize());
        sysDictMapper.findAll(sysDict);
        return page.toPageInfo();
    }

}
